package router

import (
	"github.com/gin-gonic/gin"

	"2106a-zg5/work/day15/user_api/controller"
	"2106a-zg5/work/day15/user_api/middleware"
)

func UserRouter(user *gin.RouterGroup) {
	//用户密码登录
	user.POST("/login", controller.UserLoginByUp)
	//用户手机号密码登录
	user.POST("/mobile", controller.UserLoginByMb)
	//修改密码
	user.POST("/password", middleware.TokenAuth(), controller.UserUpdatePwd)
	//上传头像
	user.POST("/photo/upload", controller.UserUploadPhoto)
	//用户注册
	user.POST("/register", controller.UserRegister)
	//用户展示
	user.GET("/list", controller.UserInfoList)
}
